package main

import (
	"flag"
	"google.golang.org/grpc"
	"log"
	"net"
	_ "petCombo-srv/init"
	"petCombo-srv/internal/serivce"
	__ "petCombo-srv/proto"
)

func main() {
	flag.Parse()
	lis, err := net.Listen("tcp", "127.0.0.1:50051")
	if err != nil {
		log.Fatalf("failed to listen: %v", err)
	}
	s := grpc.NewServer()

	__.RegisterPetServer(s, &serivce.Pets{})

	if err := s.Serve(lis); err != nil {
		log.Fatalf("failed to serve: %v", err)
	}
}
